#include using namespace std; void main() { char s[1000]; char result[1000] = ""; cin.getline(s,1000); //this is the day the Lord has made char* token = strtok(s, " "); //cout << token << endl; //cout << s << endl; //token = strtok(NULL, " "); //cout << token << endl; //cout << s << endl; while(token != NULL) { cout << token << endl; strcat(result, token); strcat(result, "yay"); strcat(result, " "); token = strtok(NULL, " "); } cout << endl << result << endl; }